#pragma once
#include "dllmain.h"
#include <wx/listctrl.h>
#include <vector>

class _WXCTRLS_API fuListCtrl : public wxListCtrl
{
public:
    fuListCtrl(
        wxWindow *			parent,
        wxWindowID			id          = wxID_ANY,
        const wxPoint&		pos         = wxDefaultPosition,
        const wxSize&		size        = wxDefaultSize,
        long				style       = wxLC_REPORT,
        const wxValidator&	validator   = wxDefaultValidator,
        const wxString&		name        = wxListCtrlNameStr);
    virtual  ~fuListCtrl(void);

    void AddColumn(const wxString & col);
    long AddItem(void);
    void ResizeColumns(void);

    enum { ITEM_NOT_FOUND = -1 };
    int FindItemByData(long dwData);
    int FindItem(long column,const wxString &value);
    int FindItem( const wxString & column , const wxString & value);
    
    void SetItemSelected(int index);
    long GetSelectedItems(std::vector<int> & selected);
    long GetSelectedItem(void);
    long GetSelectedItemData(void);

    wxString GetItemText(int index,int column);
    wxString GetItemText(int index,const wxString & column);
    void SetItemText(int index,int column, const wxString & value);
    void SetItemText(int index,const wxString & column, const wxString & value);

    wxString GetColumnName(int column);

    void PostTextMsg(wxString msg);
    void OnPostTextMsg( wxCommandEvent & evt );
};

#include "fuListCtrl_ostream.hpp"
